﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Sahit.iSoilHotel.Domain.MainBoundedContext.Tavern.Aggregates.RecordAgg;
using Sahit.iSoilHotel.Domain.MainBoundedContext.Tavern.Aggregates.PriceAgg;
using Sahit.iSoilHotel.Domain.MainBoundedContext.Tavern.Aggregates.RoomAgg;

namespace Sahit.iSoilHotel.Domain.MainBoundedContext.Tavern.Services
{
    /// <summary>
    /// Add/Update Record
    /// Add/Update Customer
    /// Update Room Status
    /// </summary>
    public class ReserveService:IReserveService
    {
        public void Reserve(Record record)
        {
            record.Room.Reserve();

            record.Status = RecordStatus.Reserved;

            record.Price = new Price();
            record.Price.GenerateNewIdentity();
            record.Price.Money = 1000;
            record.Price.RoomType = record.Room.RoomType;
            record.Price.Status = "Effective";

            record.PriceID = record.Price.ID;
        }
    }
}
